package com.ls.service.impl;

import com.ls.entity.User;
import com.ls.mapper.UserMapper;
import com.ls.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper mapper;
    @Override
    public User login(String username, String password) {
        User user = mapper.login(username, password);
        if (user!=null){
            return user;
        }
        throw new RuntimeException("登陆失败！！");
    }
}
